package org.shop.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.shop.dao.GoodsClassifyMapper;
import org.shop.entity.GoodsClassify;
import org.shop.service.GoodsClassifyService;
import org.shop.service.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GoodsClassifyServiceImpl extends BaseServiceImpl<GoodsClassify, Long> implements GoodsClassifyService{

	@Autowired
    private GoodsClassifyMapper goodsClassifyMapper;
    
	@Override
	public List<GoodsClassify> getGoodsClassifyList(Map<String, Object> paramMap) {
		return goodsClassifyMapper.getGoodsClassifyList(paramMap);
	}

	@Override
	public Map<String, Object> getGoodsClassifyInfoList(Map<String, Object> paramMap) {
		List<GoodsClassify> goodsClassifyInfoList = goodsClassifyMapper.getGoodsClassifyInfoList(paramMap);
        Integer count = goodsClassifyMapper.getGoodsClassifyInfoCount(paramMap);
        //分页数据
        Map<String, Object> dataMap = new HashMap<String, Object>();
        dataMap.put("total", count);
        dataMap.put("rows", goodsClassifyInfoList);
        return dataMap;
	}

	@Override
	public List<GoodsClassify> getGoodsClassifyChildInfoList(Map<String, Object> paramMap) {
		return goodsClassifyMapper.getGoodsClassifyChildInfoList(paramMap);
	}

}
